<?php
class KarmaModel{
    protected $value;
    protected $votelist;
    protected $mapper;


    public function setValue($_value){
        $this->value = $_value;
        return $this;
    }
    public function getValue(){
        return $this->value;
    }

    public function setVoteList($_votelist){
        $this->votelist = $_votelist;
        return $this;
    }
    public function getVoteList(){
        return $this->votelist;
    }

    public function setMapper($_mapper){
        $this->mapper = $_mapper;
        return $this;
    }
    public function getMapper(){
        if(!isset($this->mapper)){
            return $this->setMapper(new KarmaMapper());
        } else {
            return $this->mapper;
        }
    }
    //==============
    public function getListProById($user_id){
        return $this->getMapper()->getListProById($user_id);
    }
    public function getListContraById($user_id){
        return $this->getMapper()->getListContraById($user_id);
    }
}
?>
